#ifndef __EKF_LAPIC_I_H__
#define __EKF_LAPIC_I_H__

typedef uint8_t apic_id_t;

extern int apic_map[LAPIC_COUNT];

int  lapic_init(void);
int  lapic_init_ap(void);
void lapic_eoi(void);
void lapic_start_ap(apic_id_t apicid, physaddr_t addr);
void lapic_set_timer(uint32_t freq);

extern volatile uint32_t lapic[];

/* Get the current lcpu id by reading the LAPIC register */
extern volatile uint8_t  lcpu_id;

/* Send a interrupt to another cpu and wait the cpu to ack */
// int  send_ipi(int cpu, int func, int arg0, int arg1, int arg2, int arg3);

#endif
